﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="LayLoaiSanPham" TypeName="BUS.LoaiSanPhamBUS">
    </asp:ObjectDataSource>
    <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1" 
        EnableModelValidation="True">
        <Columns>
            <asp:BoundField DataField="MaLoaiSanPham" HeaderText="MaLoaiSanPham" 
                SortExpression="MaLoaiSanPham" />
            <asp:BoundField DataField="TenLoaiSanPham" HeaderText="TenLoaiSanPham" 
                SortExpression="TenLoaiSanPham" />
            <asp:BoundField DataField="MoTa" HeaderText="MoTa" SortExpression="MoTa" />
        </Columns>
    </asp:GridView>
    <asp:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" 
        EnableModelValidation="True">
        <AlternatingItemTemplate>
            <li style="background-color: #FFFFFF;color: #284775;">MaLoaiSanPham:
                <asp:Label ID="MaLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("MaLoaiSanPham") %>' />
                <br />
                TenLoaiSanPham:
                <asp:Label ID="TenLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("TenLoaiSanPham") %>' />
                <br />
                MoTa:
                <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                <br />
                GianHangs:
                <asp:Label ID="GianHangsLabel" runat="server" Text='<%# Eval("GianHangs") %>' />
                <br />
                HangSanXuats:
                <asp:Label ID="HangSanXuatsLabel" runat="server" 
                    Text='<%# Eval("HangSanXuats") %>' />
                <br />
                NhomChiTietSanPhams:
                <asp:Label ID="NhomChiTietSanPhamsLabel" runat="server" 
                    Text='<%# Eval("NhomChiTietSanPhams") %>' />
                <br />
                SanPhams:
                <asp:Label ID="SanPhamsLabel" runat="server" Text='<%# Eval("SanPhams") %>' />
                <br />
            </li>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <li style="background-color: #999999;">MaLoaiSanPham:
                <asp:TextBox ID="MaLoaiSanPhamTextBox" runat="server" 
                    Text='<%# Bind("MaLoaiSanPham") %>' />
                <br />
                TenLoaiSanPham:
                <asp:TextBox ID="TenLoaiSanPhamTextBox" runat="server" 
                    Text='<%# Bind("TenLoaiSanPham") %>' />
                <br />
                MoTa:
                <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                <br />
                GianHangs:
                <asp:TextBox ID="GianHangsTextBox" runat="server" 
                    Text='<%# Bind("GianHangs") %>' />
                <br />
                HangSanXuats:
                <asp:TextBox ID="HangSanXuatsTextBox" runat="server" 
                    Text='<%# Bind("HangSanXuats") %>' />
                <br />
                NhomChiTietSanPhams:
                <asp:TextBox ID="NhomChiTietSanPhamsTextBox" runat="server" 
                    Text='<%# Bind("NhomChiTietSanPhams") %>' />
                <br />
                SanPhams:
                <asp:TextBox ID="SanPhamsTextBox" runat="server" 
                    Text='<%# Bind("SanPhams") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
            </li>
        </EditItemTemplate>
        <EmptyDataTemplate>
            No data was returned.
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <li style="">MaLoaiSanPham:
                <asp:TextBox ID="MaLoaiSanPhamTextBox" runat="server" 
                    Text='<%# Bind("MaLoaiSanPham") %>' />
                <br />TenLoaiSanPham:
                <asp:TextBox ID="TenLoaiSanPhamTextBox" runat="server" 
                    Text='<%# Bind("TenLoaiSanPham") %>' />
                <br />MoTa:
                <asp:TextBox ID="MoTaTextBox" runat="server" Text='<%# Bind("MoTa") %>' />
                <br />GianHangs:
                <asp:TextBox ID="GianHangsTextBox" runat="server" 
                    Text='<%# Bind("GianHangs") %>' />
                <br />HangSanXuats:
                <asp:TextBox ID="HangSanXuatsTextBox" runat="server" 
                    Text='<%# Bind("HangSanXuats") %>' />
                <br />NhomChiTietSanPhams:
                <asp:TextBox ID="NhomChiTietSanPhamsTextBox" runat="server" 
                    Text='<%# Bind("NhomChiTietSanPhams") %>' />
                <br />SanPhams:
                <asp:TextBox ID="SanPhamsTextBox" runat="server" 
                    Text='<%# Bind("SanPhams") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
            </li>
        </InsertItemTemplate>
        <ItemSeparatorTemplate>
<br />
        </ItemSeparatorTemplate>
        <ItemTemplate>
            <li style="background-color: #E0FFFF;color: #333333;">MaLoaiSanPham:
                <asp:Label ID="MaLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("MaLoaiSanPham") %>' />
                <br />
                TenLoaiSanPham:
                <asp:Label ID="TenLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("TenLoaiSanPham") %>' />
                <br />
                MoTa:
                <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                <br />
                GianHangs:
                <asp:Label ID="GianHangsLabel" runat="server" Text='<%# Eval("GianHangs") %>' />
                <br />
                HangSanXuats:
                <asp:Label ID="HangSanXuatsLabel" runat="server" 
                    Text='<%# Eval("HangSanXuats") %>' />
                <br />
                NhomChiTietSanPhams:
                <asp:Label ID="NhomChiTietSanPhamsLabel" runat="server" 
                    Text='<%# Eval("NhomChiTietSanPhams") %>' />
                <br />
                SanPhams:
                <asp:Label ID="SanPhamsLabel" runat="server" Text='<%# Eval("SanPhams") %>' />
                <br />
            </li>
        </ItemTemplate>
        <LayoutTemplate>
            <ul ID="itemPlaceholderContainer" runat="server" 
                style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                <li runat="server" id="itemPlaceholder" />
            </ul>
            <div style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial, Helvetica, sans-serif;color: #FFFFFF;">
                <asp:DataPager ID="DataPager1" runat="server">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                            ShowNextPageButton="False" ShowPreviousPageButton="False" />
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                            ShowNextPageButton="False" ShowPreviousPageButton="False" />
                    </Fields>
                </asp:DataPager>
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <li style="background-color: #E2DED6;font-weight: bold;color: #333333;">
                MaLoaiSanPham:
                <asp:Label ID="MaLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("MaLoaiSanPham") %>' />
                <br />
                TenLoaiSanPham:
                <asp:Label ID="TenLoaiSanPhamLabel" runat="server" 
                    Text='<%# Eval("TenLoaiSanPham") %>' />
                <br />
                MoTa:
                <asp:Label ID="MoTaLabel" runat="server" Text='<%# Eval("MoTa") %>' />
                <br />
                GianHangs:
                <asp:Label ID="GianHangsLabel" runat="server" Text='<%# Eval("GianHangs") %>' />
                <br />
                HangSanXuats:
                <asp:Label ID="HangSanXuatsLabel" runat="server" 
                    Text='<%# Eval("HangSanXuats") %>' />
                <br />
                NhomChiTietSanPhams:
                <asp:Label ID="NhomChiTietSanPhamsLabel" runat="server" 
                    Text='<%# Eval("NhomChiTietSanPhams") %>' />
                <br />
                SanPhams:
                <asp:Label ID="SanPhamsLabel" runat="server" Text='<%# Eval("SanPhams") %>' />
                <br />
            </li>
        </SelectedItemTemplate>
    </asp:ListView>
    </form>
</body>
</html>
